package main

import "fmt"

func main() {
	a, b, sum := 1, 2, 2
	for b < 4000000 {
		a, b = b, a+b
		if b%2 == 0 {
			sum += b
		}
	}
	fmt.Println(sum)
}